require "Dialogs"
timer = 0

Black = CreateSprite("Pixel","Top")
Black.MoveTo(320, 240)
Black.Scale(640, 480)
Black.color = {0,0,0}

function Update()
	DialogUpdate()
	if timer == 0 then
		if GetAlMightyGlobal("Idioma") == "Spanish" then
			Dialog("[noskip]Antes de empezar[w:10], permiteme\rdecirte unas cosas.", {X = 100, Y = 280}, nil, nil, 1)
		else
			Dialog("[noskip]Before you start[w:10], allow me\rto tell you some things.", {X = 100, Y = 280}, nil, nil, 1)
		end
		timer = 1
	elseif timer == 1 and Dialogues[1] and not Dialogues[1].Activo then
		if GetAlMightyGlobal("Idioma") == "Spanish" then
			Dialog("[noskip]Primero que nada,[w:10] si encuentras\run error o algun tipo de bug.[w:10]\rPor favor reportalo inmediatamente\ren la pagina de gamejolt donde\rdescargaste este mod.", {X = 50, Y = 340}, nil, nil, 1)
		else
			Dialog("[noskip]First of all,[w:10] if you encounter\ran error or some kind of a bug.[w:10]\rPlease report it immediately in the\rgamejolt page where you downloaded\rthis mod.", {X = 50, Y = 340}, nil, nil, 1)
		end
		timer = 2
	elseif timer == 2 and Dialogues[1] and not Dialogues[1].Activo then
		if GetAlMightyGlobal("Idioma") == "Spanish" then
			Dialog("[noskip]Para cualquier bug o error reportado[w:10],\rNecesitare que me digas cada\raccion que hiciste antes de obtener\rel error o bug[w:10], asi como tu\rversion de CYF.", {X = 50, Y = 340}, nil, nil, 1)
		else
			Dialog("[noskip]For any bug or error reported[w:10],\rI'm gonna need you to tell me every\rsingle action you did before getting\rthe error or bug[w:10], as well as your\rCYF version.", {X = 50, Y = 340}, nil, nil, 1)
		end
		timer = 3
	elseif timer == 3 and Dialogues[1] and not Dialogues[1].Activo then
		if GetAlMightyGlobal("Idioma") == "Spanish" then
			Dialog("[noskip]Que hiciste para obtener el error?[w:10]\rDonde obtuviste el error?[w:10]\rEn que momento exactamente?[w:10]\rSi es posible manda una imagen del\rerror o bug[w:10], esto hara mas facil\rarreglar esos errores o bugs.", {X = 50, Y = 360}, nil, nil, 1)
		else
			Dialog("[noskip]What did you do to get the error?[w:10]\rWhere did you get the error?[w:10]\rIn what moment exactly?[w:10]\rIf possible send a screenshot of the\rerror or bug[w:10], this will make easier\rto fix those errors or bugs.", {X = 50, Y = 360}, nil, nil, 1)
		end
		timer = 4
	elseif timer == 4 and Dialogues[1] and not Dialogues[1].Activo then
		if GetAlMightyGlobal("Idioma") == "Spanish" then
			Dialog("[noskip]Segunda cosa[w:10], puedes pausar\rsolo en el corredor presionando P[w:10],\rde esa forma puedes salir al\rmenu principal en caso que quieras.", {X = 50, Y = 320}, nil, nil, 1)
		else
			Dialog("[noskip]Second thing[w:10], you can pause\ronly in the overworld by pressing P[w:10],\rthat way you can get out to the\rmain menu again in case you want to.", {X = 50, Y = 320}, nil, nil, 1)
		end
		timer = 5
	elseif timer == 5 and Dialogues[1] and not Dialogues[1].Activo then
		if GetAlMightyGlobal("Idioma") == "Spanish" then
			Dialog("[noskip]CUIDADO![w:10]\rEsto te hara perder cualquier progreso\rque hayas hecho en el mod[w:10], tu\rprogreso no esta siendo guardado\rde ninguna manera[w:10], asi que cuidado.", {X = 50, Y = 380}, nil, nil, 1)
		else
			Dialog("[noskip]WARNING![w:10]\rThis will make you lose any progress\ryou have made in the mod[w:10], your\rprogress isn't being saved in any\rway[w:10], so be careful with this.", {X = 50, Y = 380}, nil, nil, 1)
		end
		timer = 6
	elseif timer == 6 and Dialogues[1] and not Dialogues[1].Activo then
		if GetAlMightyGlobal("Idioma") == "Spanish" then
			Dialog("[noskip]Tercera y ultima cosa[w:10], no toques esos\rbotones que dicen ResetAlMightyGlobals[w:10],\reso hara que pierdas TODO tu\rprogreso[w:10], cuidadito.", {X = 50, Y = 320}, nil, nil, 1)
		else
			Dialog("[noskip]Third and last thing[w:10], don't touch those\rbuttons that say ResetAlMightyGlobals[w:10],\rthat will make you lose ALL your\rprogress[w:10], be careful.", {X = 50, Y = 320}, nil, nil, 1)
		end
		timer = 7
	elseif timer == 7 and Dialogues[1] and not Dialogues[1].Activo then
		if GetAlMightyGlobal("Idioma") == "Spanish" then
			Dialog("[noskip]Tambien puedes mantener presionado\rESC para salir del mod inmediatamente\rcuando quieras[w:10], esto tambien\rte hara perder progreso hecho\ren la partida.", {X = 50, Y = 340}, nil, nil, 1)
		else
			Dialog("[noskip]You can also hold ESC to quit\rthe mod immediately whenever you\rwant to[w:10], this will also\rmake you lose progress made in the\rrun.", {X = 50, Y = 340}, nil, nil, 1)
		end
		timer = 8
	elseif timer == 8 and Dialogues[1] and not Dialogues[1].Activo then
		if GetAlMightyGlobal("Idioma") == "Spanish" then
			Dialog("[noskip]Habiendo dicho eso[w:10], disfruta del\rmod y diviertete.[w:10]\rLarga vida Disbelief.", {X = 80, Y = 300}, nil, nil, 1)
		else
			Dialog("[noskip]That being said[w:10], enjoy the mod\rand have fun.[w:10]\rLong live Disbelief.", {X = 80, Y = 300}, nil, nil, 1)
		end
		timer = 9
	elseif timer == 9 and Dialogues[1] and not Dialogues[1].Activo then
		Black.Remove()
		SetAlMightyGlobal("WarningDisbelief", true)
		Encounter.Call("Reset", true)
	end
end